package com.rentplant.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.rentplant.Pojo.itemjudge;
import com.rentplant.Pojo.judgeinfo;
import com.rentplant.mapper.itemJudgeMapper;
import com.rentplant.service.itemJudgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service //让他知道这是service
public class itemJudgeServiceImp implements itemJudgeService {
    @Autowired
    private itemJudgeMapper itemjudgemapper;

    //    生成物品评价
    @Override
    public boolean itemJudge(JSONObject itemjudge){
        return itemjudgemapper.itemJudge(itemjudge);
    }

    //查询该订单是否有评论
    @Override
    public List<itemjudge> selectOrderJudge(JSONObject itemjudge){
        return itemjudgemapper.selectOrderJudge(itemjudge);
    }

    //查找该物品的评论
    @Override
    public List<judgeinfo> selectJudgeByItemid(JSONObject judgeinfo){
        return itemjudgemapper.selectJudgeByItemid(judgeinfo);
    }

    //查找不同等级
    @Override
    public List<judgeinfo> selectDifferJudge(JSONObject judgeinfo){
        return itemjudgemapper.selectDifferJudge(judgeinfo);
    }

}
